package com.cs.cssupplier.controller;

import com.cs.cssupplier.domain.CsContract;
import com.cs.cssupplier.domain.CsOperator;
import com.cs.cssupplier.service.CsContractService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author：lyj
 * @Package：com.cs.cssupplier.controller
 * @Project：RuoYi-Cloud-master
 * @name：CsContractController
 * @Date：2024/11/28 14:11
 * @Filename：CsContractController
 */
@RestController
@RequestMapping("/contract")
public class CsContractController extends BaseController {

    @Resource
    private CsContractService service;
    @GetMapping("/list")
    public TableDataInfo list(CsContract csContract) {
        System.out.println(csContract+"w3245657");
        startPage();
        List<CsContract> list = service.selectCsContractList(csContract);
        return getDataTable(list);
    }

    @RequiresPermissions
    @PostMapping("/selectContractCount")
    public R selectContractCount() {
        return R.ok(service.selectContractCount());
    }
}
